const got = require('got');
exports.main = async(event, context) => {
  let apiKey = '8qS9tdNISiyIwsfw7jc0pHQI'
  let grantType = 'client_credentials'
  let secretKey = 'aRpQUKI3AkgDhd04BwnDHvtpg5fqeLwu'
  let url = 'https://aip.baidubce.com/oauth/2.0/token?client_id=' + apiKey + '&grant_type=' + grantType + '&client_secret=' + secretKey
  let getResponse = await got(url)
  let responseJson = JSON.parse(getResponse.body);
  return responseJson

}